<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!--

/******************************************************************************
 * Copyright (c) 2007 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    IBM Corporation - initial API and implementation 
 ****************************************************************************/

-->
</head>
<body>

Specification of the <tt>Types</tt> package of the Object Constraint Lanuage
version 2.0 Abstract Syntax model.

<h2>Package Specification</h2>
<p>
This package defines the API for the structure of parsed OCL expressions, as
described in the <tt>Types</tt> package of the OCL specification version
2.0 with some extensions for this parser implementation.  These extensions
include:
</p>
<ul>
  <li>implementation of a
      {@link org.eclipse.ocl.utilities.PredefinedType PredefinedType}
      interface to provide access to the name and operations of the types
      defined by the OCL Standard Library</li>
  <li>definition of primitive-type metaclasses that the OCL specification
      erroneously references from UML, where they do not exist; UML only
      defines the instances (which are M1 classes) of these metaclasses (but
      not <tt>Real</tt>) and metaclasses for their literal values</li>
  <li>specification of an {@link org.eclipse.ocl.types.OCLStandardLibrary}
      interface providing access to a particular OCL environment's implementation
      of the standard library types</li>
</ul>
<p>
None of these extensions of the model affects the XMI serialization of OCL
expressions which, as much as possible, is conformant to the OCL specification.
</p>
<p>
Clients providing metamodel bindings for OCL (i.e., implementations of the
{@link org.eclipse.ocl.Environment API} are required to define a package of
type metaclasses extending those in this package.  The OCL specification
defines generalizations of all of these types to either the Classifier or
DataType metaclasses of the UML (or EMOF or Core::Basic, according to the binding).
Thus, providers of OCL bindings must ensure that their implementations of these
OCL types specialize the appropriate metaclasses from their metamodels.  This
ensures that the OCL type system (for a particular environment) is uniform, so
that typed elements such as
{@link org.eclipse.ocl.expressions.OCLExpression}s and
{@link org.eclipse.ocl.expressions.Variable}s can be correctly typed by the
OCL standard types (and the environment can implement the
<tt>OCLStandardLibrary</tt> interface).
</p>

@see org.eclipse.ocl.types.PrimitiveType
@see org.eclipse.ocl.types.AnyType
@see org.eclipse.ocl.types.CollectionType
@see org.eclipse.ocl.types.OCLStandardLibrary
@see org.eclipse.ocl.utilities.TypedElement

</body>
</html>
